<?php
// Affichage du menu
echo $menuexiste = displaMen(true);
?>

<?php
function displayModifForm($userInfos) {

	$mail = $_SESSION['usermail'];
	
	foreach ($userInfos as $useinf) {
		$nom = $useinf['UTI_NOM'];
		$adresse = $useinf['UTI_ADRESSE'];
		$cp = $useinf['UTI_CP'];
		$tel = $useinf['UTI_TEL'];
	}
	$pageTitre = "Modification du profil";
?>

<form name="annform" method="POST" action="?content=account&add=modif&token=<?php echo $_SESSION['tokena'] ?>" enctype="multipart/form-data">

<table style="width: 100%; align: left;">
	<tr>
		<td id="right">
		<table id="modifprofil">
			<tr>
				<td>
					<h1><?php echo $pageTitre; ?></h1>
				</td>
			</tr>
			<tr>
				<td>
				<table style="width: 100%;" id="ann">
					<tr>
						<td style="width: 100%; celspan: 5; vertical-align: top;">
						<table width="100%">
							<tr>
								<td width="30%">Nom</td>
								<td width="70%"><input name="UTI_NOM" type="text"
									value="<?php echo $nom; ?>" />
								</td>
							</tr>
							<tr>
								<td width="30%">Adresse</td>
								<td width="70%"><input name="UTI_ADRESSE" type="text"
									value="<?php echo $adresse; ?>" />
								</td>
							</tr>
							<tr>
								<td width="30%">Code postal</td>
								<td width="70%"><input name="UTI_CP" type="text"
									value="<?php echo $cp; ?>" maxlength="5" />
								</td>
							</tr>
							<tr>
								<td width="30%">Email</td>
								<td width="70%"><input name="UTI_MAIL" type="text"
									value="<?php echo $mail; ?>" />
								</td>
							</tr>
							<tr>
								<td width="30%">T&eacute;l&eacute;phone</td>
								<td width="70%"><input name="UTI_TEL" type="text"
									value="<?php echo $tel; ?>" maxlength="10" />
								</td>
							</tr>
							<tr>
								<td width="30%">
									&nbsp;
								</td>
								<td width="70%">
									<input name="submit" type="submit" value="Valider" />
								</td>
							</tr>
							
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</form>

	<?php
}
displayModifForm($userInfos);
?>
